package com.syy.reducejoin;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class OrderJoinGroup extends WritableComparator {
    public OrderJoinGroup() {
        super(OrderJoin.class, true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        OrderJoin oj1 = (OrderJoin) a;
        OrderJoin oj2 = (OrderJoin) b;
        return oj1.getPid().compareTo(oj2.getPid());
    }
}
